package ModelLag;



import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The test class PersonTest.
 *
 * @author  (your name)
 * @version (a version number or a date)
 */
public class PersonTest
{
    /**
     * Default constructor for test class PersonTest
     */
    public PersonTest()
    {
    }

    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    @Before
    public void setUp()
    {
    }
    
    @Test
    public void testIfNameSet(){
        Person p1 = new Person("Patrick", "Grævlingevej 17", "7000", "Aabenraa", "79797979");
        p1.setName("Anders");
        assertEquals("Anders", p1.getName());
    }
    
    @Test
    public void testIfAddressSet(){
        Person p1 = new Person("Patrick", "Grævlingevej 17", "7000", "Aabenraa", "79797979");
        p1.setAddress("Sigridsvej 17");
        assertEquals("Sigridsvej 17", p1.getAddress());
    
    }
    
    @Test
    public void testIfZipSet(){
         Person p1 = new Person("Patrick", "Grævlingevej 17", "7000", "Aabenraa", "79797979");
         p1.setZip("8000");
         assertEquals("8000", p1.getZip());

    }
    
    @Test
    public void testIfCitySet(){
         Person p1 = new Person("Patrick", "Grævlingevej 17", "7000", "Aabenraa", "79797979");
         p1.setCity("Aarhus");
         assertEquals("Aarhus", p1.getCity()); 
    }
    
    @Test
    public void testIfPhoneSet(){
         Person p1 = new Person("Patrick", "Grævlingevej 17", "7000", "Aabenraa", "79797979");
         p1.setPhone("80808080");
         assertEquals("80808080", p1.getPhone());
    }
    
    
    
    
    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    @After
    public void tearDown()
    {
    }
}
